package com.lb.pdm.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 户籍成员表
 * </p>
 *
 * @author pdm
 * @since 2025-10-29
 */
@Data
@TableName("household_member")
@Schema(name = "HouseholdMember对象", description = "户籍成员表")
public class HouseholdMember implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "成员ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "户籍ID")
    @TableField("household_id")
    private Long householdId;

    @Schema(description = "人员ID")
    @TableField("person_id")
    private Long personId;

    @Schema(description = "与户主关系")
    @TableField("relationship")
    private String relationship;

    @Schema(description = "入户日期")
    @TableField("join_date")
    private Date joinDate;

    @Schema(description = "入户原因")
    @TableField("join_reason")
    private String joinReason;

    @Schema(description = "离户日期")
    @TableField("leave_date")
    private Date leaveDate;

    @Schema(description = "离户原因")
    @TableField("leave_reason")
    private String leaveReason;

    @Schema(description = "状态：1-在册，0-已迁出")
    @TableField("status")
    private Byte status;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人ID")
    @TableField("create_by")
    private Long createBy;

    @Schema(description = "更新人ID")
    @TableField("update_by")
    private Long updateBy;
}
